package com.xbk.util;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ArrayUtil {
	
	public static ArrayList<String> addAll(List<String> srcList,String sArray){
		ArrayList<String> list = new ArrayList<String>();
		String[] arr = sArray.split(",");
		for (String string : arr) {
			list.add(string);
		}
		list.addAll(srcList);
		return list;
	}

	public static Map<String, String> addAll(Map<String, String> m_stringNumberCols, String sToStringNumberCols) {
		Map<String, String> map = new HashMap<String, String>();
		String[] es = sToStringNumberCols.split(",");
		for (String e : es) {
			String[] ee = e.split("#");
			if(ee.length == 2)
				map.put(ee[0].toUpperCase(), ee[1]);
		}
		map.putAll(m_stringNumberCols);
		return map;
	}
	
}
